const mysql = require("mysql2/promise")
const config = require("../config")
const pool = mysql.createPool(config.mysql) //连接池


export const query = async(sql, array) => {
    const [res] = await pool.execute(sql, array)
    return res
}